<template>
  <div>
    <Sort :isdisable="isShowAttrComponents"></Sort>
    <AttrList
      @SwitchAttrComponents="SwitchAttrComponents"
      v-if="isShowAttrComponents === '1'"
    ></AttrList>
    <AttrUpdate
      @SwitchAttrComponents="SwitchAttrComponents"
      v-else-if="isShowAttrComponents === '2'"
    ></AttrUpdate>
  </div>
</template>

<script>
import AttrUpdate from './components/attr-update.vue'
import AttrList from './components/attr-list.vue'

export default {
  name: 'Attribute',
  data() {
    return {
      isShowAttrComponents: '1'
    }
  },
  methods: {
    SwitchAttrComponents(val) {
      this.isShowAttrComponents = val
    }
  },
  components: {
    AttrList,
    AttrUpdate
  }
}
</script>

<style lang="less" scoped></style>
